#!/bin/bash
set -e

VENV=@PROJECT_BINARY_DIR@/venv

virtualenv -p python3 ${VENV}
source ${VENV}/bin/activate

pip install numpy
pip install sphinx

source @POPLAR_INSTALL_DIR@/enable.sh

export PYTHONPATH=@PROJECT_BINARY_DIR@/python:$PYTHONPATH
export LIBRARY_PATH=@PROJECT_BINARY_DIR@/python:$LIBRARY_PATH
export LD_LIBRARY_PATH=@PROJECT_BINARY_DIR@/python:$LD_LIBRARY_PATH

echo gen_docs.sh
echo $LIBRARY_PATH
echo $PYTHONPATH
echo @PYTHON_EXECUTABLE@ ${*}
@PYTHON_EXECUTABLE@ ${*}
